﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using Ebada.Platform.Model;
using Ebada.UI.Base;
using Ebada.Client;
using Ebada.Core;
using Ebada.Client.Platform;
namespace Ebada.Modules.Document
{
    /// <summary>
    /// 移出单证
    /// </summary>
    public partial class frmDocumentMoveOut : FormBase{
        public frmDocumentMoveOut()
        {
            InitializeComponent();
            ucDocumentTypeLeft1.FocusedNodeChanged += new SendDataEventHandler<DocumentType>(ucDocumentTypeLeft1_FocusedNodeChanged);
        }

        void ucDocumentTypeLeft1_FocusedNodeChanged(object sender, DocumentType obj)
        {
            if (obj!=null)
            {
                string sql = " where DocumentTypeID='" + obj.DocumentTypeID + "' and DocState=1  order by DocBookID";
                ucDocumentsB1.RefreshDataBySqlWhere(sql);

            }
        }

     private void frmDocumentBorrowOut_Load(object sender, EventArgs e)
     {
         ucDocumentTypeLeft1.InitData();
         ucDocumentsB1.Show_Style("移出");
         ucDocumentsB1.Show_Chezi();
         string Org_ID = MainHelper.UserBaseX.Org_ID;
         string sqlwhere = " where OrgID='" + Org_ID + "' and DocState=1  order by DocBookID";
         ucDocumentsB1.RefreshDataBySqlWhere(sqlwhere);
         
     }
     
       
        
       
       
    }
}